#set($title = "智能会议预定系统-登录")
<div class="container-fluid">
    <div class="row-fluid">

        <div class="row-fluid">
            <div class="span12 center login-header">
                <h2>修改密码</h2>
            </div>
            <!--/span-->
        </div>
        <!--/row-->

        <div class="row-fluid">
            <div class="well span5 center login-box">
                <div class="alert alert-info errormsg error">$!msg</div>
                <form class="form-horizontal" action="/changepwd" method="post">
                    <fieldset>
                        <div class="input-prepend" data-rel="tooltip"
                            data-original-title="Password">
                            <span class="add-on"><i class="icon-lock"></i></span><input
                                class="input-large span10" type="password" name="pwd" id="pwd"
                                placeholder="请输入原密码">
                        </div>
                        <div class="clearfix"></div>

                        <div class="input-prepend" data-rel="tooltip"
                            data-original-title="Password">
                            <span class="add-on"><i class="icon-lock"></i></span><input
                                class="input-large span10" type="password" name="newpwd" id=""
                                placeholder="请输入新密码">
                        </div>
                        <div class="clearfix"></div>
                        <div class="input-prepend" data-rel="tooltip"
                            data-original-title="Password">
                            <span class="add-on"><i class="icon-lock"></i></span><input
                                class="input-large span10" type="password" name="newpwd2" id="newpwd2"
                                placeholder="请再次输入新密码">
                        </div>
                        <div class="clearfix"></div>

                        <p class="center span5">
                            <button type="submit" class="btn btn-primary">修改密码</button>
                        </p>
                    </fieldset>
                </form>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
    </div>
    <!--/fluid-row-->

</div>
<script type="text/javascript">
    $(function(){
        $("input[type='submit']").click(function(){
            var pwd = '$!{session.getAttribute("user").getPassword()}';
           
            if ($("#pwd").val().length == 0 || $("#newpwd").val().length == 0 || $("#newpwd2").val().length == 0) {
                alert("原密码,密码必填！");
                return false;
            }
            if ($("#newpwd").val() != $("#newpwd2").val()) {
                alert("两次密码不同！");
                return false;
            }
        });
        $("input[title]").tooltip();
        if ("$!msg" == "") {
            $(".error").hide();
        }
    });
</script>
